// my/pages/vehicle/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    vehicle:{}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad() {
    this.getvehicle()
  },
 async getvehicle(){
    const {data:vehicle,code} = await wx.http.get('/driver/users/truck')
    if (code !== 200) return wx.utils.toast()
    this.setData({
      vehicle
    })
  }
 
})